#include <iostream>
#include <stdlib.h>

using namespace std;

int main(int argc, char * argv[]) {

  const string DESC = "Rename to...";
  const int SUBTYPE = 1;
  const int AUX = 2;
  
  if (argc < 2) {
    cout<<"Error: Must have arguments";
    return 1;
  } else if (string(argv[1]) == "-h") {
    cout<<DESC;
  } else if (string(argv[1]) == "-t") {
    cout<<SUBTYPE;
  } else if (string(argv[1]) == "-x") {
    cout<<AUX;
  } else if (argc < 3) {
    cout<<"Error: Must have two arguments";
  } else {
    string arg1 = string(argv[1]);
    string cmd = "\"" + arg1 + "\" \"" + arg1.substr(0, arg1.find_last_of("/")+1) + string(argv[2]) + "\"";
    #ifdef _WIN32
    cmd = "ren " + cmd;
    #else
    cmd = "mv " + cmd;
    #endif
    system(cmd.c_str());
  }
  
  return 0;
}
